<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    html *{
      margin: 0;
      padding: 0;
    }
  </style>
</head>
<body>

<section id="margin">
  <style>
    #margin {
      background: red;
      margin-bottom: 20px;
      overflow: hidden;
    }
    #margin>p {
      margin: 5px auto 25px;
      background: #ccc;
    }
  </style>
  <p>1</p>
  <div style="overflow: hidden">
    <p>2</p>
  </div>
  <p>3</p>
</section>

<section id="layout">
  <style>
    #layout {
      background: red;
    }

    #layout .left {
      float: left;
      width: 100px;
      height: 100px;
      background: pink;
    }

    #layout .right {
      height: 110px;
      background: #ccc;
      overflow: hidden;
    }
  </style>
  <div class="left"></div>
  <div class="right"></div>
</section>
</body>
</html>
